<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title>我的订单</title>
    <link rel="stylesheet" href="__MOBILE__/jscss/index.css">
    <link rel="stylesheet" href="__MOBILE__/jscss/css.css">
    <script type="text/javascript" src="__MOBILE__/jscss/w_rem.js" ></script>
    <script src="__MOBILE__/jscss/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script></head>
<body style="background: #f8f8f8;">
    <div class="order_top">
        <div class="pay_top_back" onclick="my()"><img src="__MOBILE__/img/a15.png"></div>
        <div class="order_top_title">{:cache('web_name')}</div>
    </div>
    <div id="data"></div>
</body>
</html>
<style>
    .wtw{
        font-size: 16px;color: #333;
    }
</style>
<script>

    $(document).ready(function(){

        // var salary_id = 0;
        // var position_id = 0;
        var salary_id = "{:input('salary_id',0)}";
        var position_id = "{:input('position_id',0)}";
        var list_rows = {$list_rows};
        var page = 2;
        var is_data = true;
        var status = {:input('status',0)};
        $(window).scroll(function(){
            var scrollTop = $(this).scrollTop();               //滚动条距离顶部的高度
            var scrollHeight = $(document).height();           //当前页面的总高度
            var windowHeight = $(this).height();               //当前可视的页面高度
            if(scrollTop + windowHeight >= scrollHeight){ //距离顶部+当前高度 >=文档总高度 即代表滑动到底部
                var _this = $(".pro-ul");

                if(page > {$data->lastPage()}) {
                    //alert('后面没有数据了！');

                    if(is_data){
                        layer.msg('没有数据了');
                    }
                    is_data = false;
                    // $("#no_more").text('没有数据了亲...');
                    return false;
                }else {
                    data(page,list_rows,salary_id,position_id);
                    page += 1;
                }

            }

        })
        data(1,list_rows,"{:input('salary_id',0)}","{:input('position_id',0)}");

    })

    function data(page,list_rows,salary_id,position_id) {
        $.ajax({
            type: "POST", //用POST方式传输
            dataType: "html", //数据格式:JSON
            data:{page:page,list_rows:list_rows,salary_id:salary_id,position_id:position_id},
            url: "{:url('ajax')}", //目标地址
            async: false,
            success: function (ret) {
                $("#data").append(ret);
            }
        });
    }
    function my(){
        window.location.href = "{:url('my')}";
    }
</script>